package a_buffer;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

/**
 * @author Cheng-02
 * @version V1.0
 * @Package a_buffer
 * @date 2024/4/14 上午11:21
 */
public class Test {
    public static void main(String[] args) throws IOException {
        long start=System.currentTimeMillis();
        FileOutputStream fileOutputStream=new FileOutputStream("D:\\images\\123.png");
        FileInputStream fileInputStream=new FileInputStream("D:\\images\\test.png");
        int len;
        byte[] arr=new byte[10240];
        while((len=fileInputStream.read())!=-1){
            fileOutputStream.write(len);

        }
        long end=System.currentTimeMillis();
        System.out.println(end-start);
        fileInputStream.close();
        fileOutputStream.close();



    }
}
